
STANDARDMODELDIR = ../standardmodel


FLAGS = -O2
CUDAFLAGS = 

CUDAPATH = /usr/local/cuda
CUDASDK = /usr/local/NVIDIA_CUDA_SDK
INC = -I$(CUDAPATH)/include -I$(CUDASDK)/common/inc
LIB_ = -L$(CUDAPATH)/lib -L$(CUDASDK)/lib -L$(CUDASDK)/common/lib

OBJS = obj/standard.o obj/main.o obj/s1.o obj/c1.o obj/s2.o obj/c2.o



all: $(OBJS)
	g++ -o main $(OBJS)  $(INC) $(LIB_) -lcudart -lGL -lGLU -lcutil -I/usr/local/include/opencv -L/usr/local/lib -lcv -lcxcore -lcvaux -lhighgui $(FLAGS)


clean:
	rm -f obj/*.o
	rm -f *.linkinfo
	rm -f main

cleanc2:
	rm -fr c2/train/*.c2
	rm -fr c2/test/*.c2




obj/standard.o : $(STANDARDMODELDIR)/cuda/standard.cu
	nvcc -c -o obj/standard.o $(STANDARDMODELDIR)/cuda/standard.cu -I/usr/local/include/opencv $(FLAGS) $(INC) $(CUDAFLAGS)

obj/s1.o : $(STANDARDMODELDIR)/cuda/s1.cu
	nvcc -c -o obj/s1.o $(STANDARDMODELDIR)/cuda/s1.cu -I/usr/local/include/opencv $(FLAGS) $(INC) $(CUDAFLAGS)

obj/c1.o : $(STANDARDMODELDIR)/cuda/c1.cu
	nvcc -c -o obj/c1.o $(STANDARDMODELDIR)/cuda/c1.cu -I/usr/local/include/opencv $(FLAGS) $(INC) $(CUDAFLAGS)

obj/s2.o : $(STANDARDMODELDIR)/cuda/s2.cu
	nvcc -c -o obj/s2.o $(STANDARDMODELDIR)/cuda/s2.cu -I/usr/local/include/opencv $(FLAGS) $(INC) $(CUDAFLAGS)

obj/c2.o : $(STANDARDMODELDIR)/cuda/c2.cu
	nvcc -c -o obj/c2.o $(STANDARDMODELDIR)/cuda/c2.cu -I/usr/local/include/opencv $(FLAGS) $(INC) $(CUDAFLAGS)

obj/main.o : main.cpp
	g++ -c main.cpp -o obj/main.o -I/usr/local/include/opencv $(FLAGS) $(INC)



